3.2.63 \(\int \frac {x (A+B x)}{a+b x} \, dx\)

Optimal. Leaf size=45 \[ -\frac {a (A b-a B) \log (a+b x)}{b^3}+\frac {x (A b-a B)}{b^2}+\frac {B x^2}{2 b} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {77} \begin {gather*} \frac {x (A b-a B)}{b^2}-\frac {a (A b-a B) \log (a+b x)}{b^3}+\frac {B x^2}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(A + B*x))/(a + b*x),x]

[Out]

((A*b - a*B)*x)/b^2 + (B*x^2)/(2*b) - (a*(A*b - a*B)*Log[a + b*x])/b^3

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin {align*} \int \frac {x (A+B x)}{a+b x} \, dx &=\int \left (\frac {A b-a B}{b^2}+\frac {B x}{b}+\frac {a (-A b+a B)}{b^2 (a+b x)}\right ) \, dx\\ &=\frac {(A b-a B) x}{b^2}+\frac {B x^2}{2 b}-\frac {a (A b-a B) \log (a+b x)}{b^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 41, normalized size = 0.91 \begin {gather*} \frac {b x (-2 a B+2 A b+b B x)+2 a (a B-A b) \log (a+b x)}{2 b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(A + B*x))/(a + b*x),x]

[Out]

(b*x*(2*A*b - 2*a*B + b*B*x) + 2*a*(-(A*b) + a*B)*Log[a + b*x])/(2*b^3)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x (A+B x)}{a+b x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(x*(A + B*x))/(a + b*x),x]

[Out]

IntegrateAlgebraic[(x*(A + B*x))/(a + b*x), x]

________________________________________________________________________________________

fricas [A]  time = 0.74, size = 47, normalized size = 1.04 \begin {gather*} \frac {B b^{2} x^{2} - 2 \, {\left (B a b - A b^{2}\right )} x + 2 \, {\left (B a^{2} - A a b\right )} \log \left (b x + a\right )}{2 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/(b*x+a),x, algorithm="fricas")

[Out]

1/2*(B*b^2*x^2 - 2*(B*a*b - A*b^2)*x + 2*(B*a^2 - A*a*b)*log(b*x + a))/b^3

________________________________________________________________________________________

giac [A]  time = 0.91, size = 45, normalized size = 1.00 \begin {gather*} \frac {B b x^{2} - 2 \, B a x + 2 \, A b x}{2 \, b^{2}} + \frac {{\left (B a^{2} - A a b\right )} \log \left ({\left | b x + a \right |}\right )}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/(b*x+a),x, algorithm="giac")

[Out]

1/2*(B*b*x^2 - 2*B*a*x + 2*A*b*x)/b^2 + (B*a^2 - A*a*b)*log(abs(b*x + a))/b^3

________________________________________________________________________________________

maple [A]  time = 0.00, size = 52, normalized size = 1.16 \begin {gather*} \frac {B \,x^{2}}{2 b}-\frac {A a \ln \left (b x +a \right )}{b^{2}}+\frac {A x}{b}+\frac {B \,a^{2} \ln \left (b x +a \right )}{b^{3}}-\frac {B a x}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(B*x+A)/(b*x+a),x)

[Out]

1/2*B*x^2/b+1/b*A*x-1/b^2*B*a*x-a/b^2*ln(b*x+a)*A+a^2/b^3*ln(b*x+a)*B

________________________________________________________________________________________

maxima [A]  time = 1.10, size = 45, normalized size = 1.00 \begin {gather*} \frac {B b x^{2} - 2 \, {\left (B a - A b\right )} x}{2 \, b^{2}} + \frac {{\left (B a^{2} - A a b\right )} \log \left (b x + a\right )}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/(b*x+a),x, algorithm="maxima")

[Out]

1/2*(B*b*x^2 - 2*(B*a - A*b)*x)/b^2 + (B*a^2 - A*a*b)*log(b*x + a)/b^3

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 46, normalized size = 1.02 \begin {gather*} x\,\left (\frac {A}{b}-\frac {B\,a}{b^2}\right )+\frac {B\,x^2}{2\,b}+\frac {\ln \left (a+b\,x\right )\,\left (B\,a^2-A\,a\,b\right )}{b^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(A + B*x))/(a + b*x),x)

[Out]

x*(A/b - (B*a)/b^2) + (B*x^2)/(2*b) + (log(a + b*x)*(B*a^2 - A*a*b))/b^3

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 37, normalized size = 0.82 \begin {gather*} \frac {B x^{2}}{2 b} + \frac {a \left (- A b + B a\right ) \log {\left (a + b x \right )}}{b^{3}} + x \left (\frac {A}{b} - \frac {B a}{b^{2}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/(b*x+a),x)

[Out]

B*x**2/(2*b) + a*(-A*b + B*a)*log(a + b*x)/b**3 + x*(A/b - B*a/b**2)

________________________________________________________________________________________